<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="java.sql.*"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.1//EN"
 	"http://struts.apache.org/dtds/struts-2.1.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
</head>
<link href="css/css.css" rel="stylesheet" type="text/css">
<script  type = "text/javascript" >
function change(){
	 var r = '<%=request.getAttribute("role")%>' ;
     document.getElementById("rolesel")[r].selected=true;
}
</script>
<body onload="change()" bgcolor="#ecf9dc"><font size="3" color="#66cc33">修改用户角色！！</font>
	<s:form id="form1" name="form1" method="post" action="updateRoleAction">
					<table border="0" align="center" cellpadding="0">
						<%-- <tr>
							<td width="180"><br> <s:select label="角色"
									list="{'管理员','普通用户','管理人员'}" value="普通用户" 
									name="role"></s:select>
							</td>
						</tr> --%>
						<tr>
							<td width="180"><br> <s:textfield label="用户编号" readonly="true"
									value="%{#request.user.id}" property="userid" name="id"></s:textfield>
							</td>
						</tr>
						<tr>
							<td width="180"><br> <s:textfield label="用户名" readonly="true"
									value="%{#request.user.uname}" property="uname" name="uname"></s:textfield>
							</td>
						</tr>
						<tr>
							<td><br>角色：</td>
							<td><br><select id="rolesel" name="role" style="width:170px;display:block;">
									<option value="a">a</option>
									<option value="b">b</option>
									<option value="c">c</option>
									<option value="d">d</option>
							</select></td>
						</tr>
<%-- 						
						<tr>
							<td><br> <s:textfield label="职位" name="position"
									property="position"></s:textfield>
							</td>
						</tr>
						<tr>
							<td><br> <s:textfield label="部门" name="department"
									property="department"></s:textfield>
							</td>
						</tr> --%>
					</table>
					<table align="center" style="padding-top:30px;width:50%;">
					<tr><td><input type="submit" value="修改" /></td>
					<td><input type="button"  value="关闭窗口" onClick="window.close()"/></td></tr>
					</table>
	</s:form>
</body>
</html>
